import React from 'react';
import { Skeleton } from 'antd';
import { useRequest } from '@/hooks';
import GroupingOfCourse from '@/pages/Organization/EmployeeManage/components/SupervisorProfile/GroupingOfCourse';
import { getGroupingOfCourseData } from '@/pages/Organization/EmployeeManage/services';

// import CourseTabContent from '@/pages/Organization/EmployeeManage/EmployeeDetail/components/CourseTabContent';
// const History = props => <CourseTabContent {...props} title="" />;

const History = ({ employeeCode }) => {
    const { data = {}, loading } = useRequest(() => getGroupingOfCourseData(employeeCode), {
        ready: !!employeeCode,
        refreshDeps: [employeeCode]
    });
    return (
        <Skeleton loading={loading}>
            <GroupingOfCourse data={data} showWrap={false} />
        </Skeleton>
    );
};

export default History;
